package cn.com.headfree.staffing.controller;

import cn.com.headfree.base.controller.ResultData;
import cn.com.headfree.entity.TStaffingStandard;
import cn.com.headfree.staffing.service.IStaffingService;
import com.gta.edu.sdk.common.dto.Page;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Description: 定员信息
 * @Author wcSun
 * @Date 2021/12/31
 **/
@Controller
@RequestMapping(value = "/staffing", produces = "application/json;charset=UTF-8")
public class StaffingController {
    private static final Logger LOG = LogManager.getLogger(StaffingController.class);
    @Autowired
    private IStaffingService staffingService;

    @RequestMapping(value = "/standard")
    @ResponseBody
    public ResultData standard(Page<TStaffingStandard> page) {
        ResultData result = new ResultData();
        try {
            staffingService.standard(page);
            result.setData(page);
        } catch (Exception e) {
            LOG.error("查询定员信息列表信息失败！", e.getMessage());
        }
        return result;
    }
}
